package org.gr.ias.common.entity;

import java.io.Serializable;
import java.util.Date;

public class ProjectFundsQuality implements Serializable {
    /** id*/
    private String id;

    /** 项目资金编号*/
    private String refId;

    /** 推荐类型(0:项目、1:资金)*/
    private String type;

    /** 有效开始时间*/
    private Date beginDatetime;

    /** 有效结束时间*/
    private Date endDatetime;

    /** 显示顺序*/
    private Integer sequenceNumber;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getRefId() {
        return refId;
    }

    public void setRefId(String refId) {
        this.refId = refId == null ? null : refId.trim();
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    public Date getBeginDatetime() {
        return beginDatetime;
    }

    public void setBeginDatetime(Date beginDatetime) {
        this.beginDatetime = beginDatetime;
    }

    public Date getEndDatetime() {
        return endDatetime;
    }

    public void setEndDatetime(Date endDatetime) {
        this.endDatetime = endDatetime;
    }

    public Integer getSequenceNumber() {
        return sequenceNumber;
    }

    public void setSequenceNumber(Integer sequenceNumber) {
        this.sequenceNumber = sequenceNumber;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProjectFundsQuality other = (ProjectFundsQuality) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRefId() == null ? other.getRefId() == null : this.getRefId().equals(other.getRefId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getBeginDatetime() == null ? other.getBeginDatetime() == null : this.getBeginDatetime().equals(other.getBeginDatetime()))
            && (this.getEndDatetime() == null ? other.getEndDatetime() == null : this.getEndDatetime().equals(other.getEndDatetime()))
            && (this.getSequenceNumber() == null ? other.getSequenceNumber() == null : this.getSequenceNumber().equals(other.getSequenceNumber()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRefId() == null) ? 0 : getRefId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getBeginDatetime() == null) ? 0 : getBeginDatetime().hashCode());
        result = prime * result + ((getEndDatetime() == null) ? 0 : getEndDatetime().hashCode());
        result = prime * result + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", refId=").append(refId);
        sb.append(", type=").append(type);
        sb.append(", beginDatetime=").append(beginDatetime);
        sb.append(", endDatetime=").append(endDatetime);
        sb.append(", sequenceNumber=").append(sequenceNumber);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}